package com.cnhis.cloudhealth.clidoctorweb.clicollectfee;

import javax.ws.rs.FormParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.jboss.resteasy.logging.Logger;
import org.springframework.stereotype.Component;

import com.alibaba.dubbo.config.annotation.Reference;
import com.cnhis.cloudhealth.clinical.clidoctor.clicollectfee.service.ICliCollectFee;
import com.cnhis.cloudhealth.commons.Mappers.ModelVo;
import java.util.HashMap;

@Path("clicollectfee")
@Component
public class CliCollectFeeRest {
	Logger log = Logger.getLogger(CliCollectFeeRest.class); 
	@Reference
	private ICliCollectFee cliCollectFee;
	
	/* ScriptId(1418) */
	/* Description(收费项目检索  材料) */
	/**
	 * 
	 * @param lACF01
	 * @param lBDO01 医疗项目id
	 * @param lSql 
	 * @param lDate 日期 YYYY-MM-DD
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings({ "unchecked" })
	@POST
	@Path("clinicsendadviceblank")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo queryCollectFeeItem(
			@FormParam("lACF01") int lACF01,
			@FormParam("lBDO01") int lBDO01,
			@FormParam("lSql") String lSql,
			@FormParam("lDate") String lDate
			)throws Exception{
		HashMap map = new HashMap();
		map.put("lACF01", lACF01);
		map.put("lBDO01", lBDO01);
		map.put("lSql", lSql);
		map.put("lDate", "lDate");
		return cliCollectFee.queryCollectFeeItem(map);
	}
	/* ScriptId(1057) */
	/* Description(树形：收费项目对应明细  药品) */
	/**
	 * 
	 * @param lACF01
	 * @param lBDO01 医疗项目分类id
	 * @param lSql 搜索关键字
	 * @param lBDN01 收费项目类型id
	 * @param lBCK01 开单科室id
	 * @param lDate 有效期时间 YYYY-MM-DD
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings({ "unchecked" })
	@POST
	@Path("collectfeeitemdetail")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo collectFeeItemDetail(
			@FormParam("lACF01") int lACF01,
			@FormParam("lBDO01") int lBDO01,
			@FormParam("lSql") String lSql,
			@FormParam("lBDN01") String lBDN01,
			@FormParam("lBCK01") int lBCK01,
			@FormParam("lDate") String lDate
			)throws Exception{
		HashMap map = new HashMap();
		map.put("lACF01", lACF01);
		map.put("lBDO01", lBDO01);
		map.put("lSql", lSql);
		map.put("lBDN01", lBDN01);
		map.put("lBCK01", lBCK01);
		map.put("lDate", "lDate");
		return cliCollectFee.collectFeeItemDetail(map);
	}
	/* ScriptId(1061) */
	/* Description(树形：收费项目对应明细) */
	/**
	 * 
	 * @param lACF01 业务类别
	 * @param lBCA01 收费项目分类id
	 * @param lSql  查询关键字  %
	 * @param lDate 有效期时间 YYYY-MM-DD
	 * @return
	 * @throws Exception
	 */
	@SuppressWarnings({ "unchecked" })
	@POST
	@Path("chargedetail")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo chargeDetail(
			@FormParam("lACF01") int lACF01,
			@FormParam("lBCA01") int lBCA01,
			@FormParam("lSql") String lSql,
			@FormParam("lDate") String lDate
			)throws Exception{
		HashMap map = new HashMap();
		map.put("lACF01", lACF01);
		map.put("lBCA01", lBCA01);
		map.put("lSql", lSql);
		map.put("lDate", lDate);
		return cliCollectFee.chargeDetail(map);
	}
	/* ScriptId(1055) */
	/* Description(树形：所有收费项目左边列表) */
	@POST
	@Path("allfeeitem")
	@Produces({ MediaType.APPLICATION_JSON })
	public ModelVo allFeeItem()throws Exception{
		return cliCollectFee.allFeeItem();
	}
}
